home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / hplip / ui4 / readonlyradiobutton.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2009-10-28  |  2KB  |  41 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from PyQt4.QtCore import *
  5. from PyQt4.QtGui import *
  6.  
  7. class ReadOnlyRadioButton(QRadioButton):
  8.     
  9.     def __init__(self, parent):
  10.         QRadioButton.__init__(self, parent)
  11.         self.setFocusPolicy(Qt.NoFocus)
  12.         self.clearFocus()
  13.  
  14.     
  15.     def mousePressEvent(self, e):
  16.         if e.button() == Qt.LeftButton:
  17.             return None
  18.         QRadioButton.mousePressEvent(e)
  19.  
  20.     
  21.     def mouseReleaseEvent(self, e):
  22.         if e.button() == Qt.LeftButton:
  23.             return None
  24.         QRadioButton.mouseReleaseEvent(e)
  25.  
  26.     
  27.     def mouseMoveEvent(self, e):
  28.         pass
  29.  
  30.     
  31.     def keyPressEvent(self, e):
  32.         if e.key() not in (Qt.Key_Up, Qt.Key_Left, Qt.Key_Right, Qt.Key_Down, Qt.Key_Escape):
  33.             return None
  34.         QRadioButton.keyPressEvent(e)
  35.  
  36.     
  37.     def keyReleaseEvent(self, e):
  38.         pass
  39.  
  40.  
  41.